import React from "react"
//引入组件 
import BusinessIndex from "@/pages/Business/Index"
import BusinessLogin from "@/pages/Business/Login"
import BusinessRegister from "@/pages/Business/Register"
import BusinessProfile from "@/pages/Business/Profile"
import BusinessEmailAuth from "@/pages/Business/EmailAuth"
import BusinessHousehold from "@/pages/Business/Household"
import BusinessGuest from "@/pages/Business/Guest"
import BusinessOrder from "@/pages/Business/order/Order"
import BusinessOrderInfo from "@/pages/Business/order/OrderInfo"
import BusinessCoupon from "@/pages/Business/Coupon"
import BusinessContact from "@/pages/Business/Contact"
import BusinessComment from "@/pages/Business/order/Comment"


// 创建子路由列表
const RouterList = [
    {
        path:"index",
        element:BusinessIndex,
        auth:true
    },
    {
        path:"login",
        element:BusinessLogin,
    },
    {
        path:"register",
        element:BusinessRegister,
    },
    {
        path:"profile",
        element:BusinessProfile,
        auth:true
    },
    {
        path:"order",
        element:BusinessOrder,
        auth:true
    },
    {
        path:"orderInfo",
        element:BusinessOrderInfo,
        auth:true
    },
    {
        path:"coupon",
        element:BusinessCoupon,
        auth:true
    },
    {
        path:"contact",
        element:BusinessContact,
        auth:true
    },
    {
        path:"emailAuth",
        element:BusinessEmailAuth,
        auth:true
    },
    {
        path:"household",
        element:BusinessHousehold,
        auth:true
    },
    {
        path:"guest",
        element:BusinessGuest,
        auth:true
    },
    {
        path:"comment",
        element:BusinessComment,
        auth:true
    },
]


// 创建父组件，仅仅作为容器
const ParentRouter = () => <React.Router.Outlet/>

// 创建路由列表
const Routes = [
    {
        path:"/business",
        element:ParentRouter,
        children:RouterList
    }
]

export default Routes